//
//  NSUserDefaults+SafeAccess.h
//  iOS-Categories (https://github.com/shaojiankui/iOS-Categories)
//
//  Created by Jakey on 15/5/23.
//  Copyright (c) 2015年 www.skyfox.org. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSUserDefaults (SafeAccess)

+ (nullable id)objectForKey:(NSString *_Nullable)defaultName;

+ (NSString *_Nullable)stringForKey:(NSString *_Nullable)defaultName;

+ (NSArray *_Nullable)arrayForKey:(NSString *_Nullable)defaultName;

+ (NSDictionary *_Nullable)dictionaryForKey:(NSString *_Nullable)defaultName;

+ (NSData *_Nullable)dataForKey:(NSString *_Nullable)defaultName;

+ (NSArray *_Nullable)stringArrayForKey:(NSString *_Nullable)defaultName;

+ (NSInteger)integerForKey:(NSString *_Nullable)defaultName;

+ (float)floatForKey:(NSString *_Nullable)defaultName;

+ (double)doubleForKey:(NSString *_Nullable)defaultName;

+ (BOOL)boolForKey:(NSString *_Nullable)defaultName;

+ (NSURL *_Nullable)URLForKey:(NSString *_Nullable)defaultName;

#pragma mark - WRITE FOR STANDARD

+ (void)setObject:(nullable id)value forKey:(NSString *_Nullable)defaultName;

#pragma mark - READ ARCHIVE FOR STANDARD

+ (nullable id)arcObjectForKey:(NSString *_Nullable)defaultName;

#pragma mark - WRITE ARCHIVE FOR STANDARD

+ (void)setArcObject:(nullable id)value forKey:(NSString *_Nullable)defaultName;
@end
